import { post, get } from '../../../request.js'

// 查询页面数据字典
export const getPageDict = params => {
    return get({
        url: '/tool/xxljob/jobinfo/getPageDict',
        params
    })
}
// 查询任务列表
export function pageListJobInfo(query) {
    return post({
        url: '/tool/xxljob/jobinfo/pageList',
        params: query
    })
}

export function listAllJobInfo() {
    return post({
        url: '/tool/xxljob/jobinfo/listAll'
    })
}

// 新增任务
export const addJobInfo = params => {
    return post({
        url: '/tool/xxljob/jobinfo/add',
        params
    })
}

// 修改任务
export const updateJobInfo = params => {
    return post({
        url: '/tool/xxljob/jobinfo/update',
        params
    })
}

// 删除任务
export const delJobInfo = params => {
    return post({
        url: '/tool/xxljob/jobinfo/remove',
        params
    })
}
// 启动任务
export const startJobInfo = params => {
    return post({
        url: '/tool/xxljob/jobinfo/start',
        params
    })
}

// 停止任务
export const stopJobInfo = params => {
    return post({
        url: '/tool/xxljob/jobinfo/stop',
        params
    })
}

// 停止任务
export const triggerJobInfo = params => {
    return get({
        url: '/tool/xxljob/jobinfo/trigger',
        params
    })
}

//下次执行时间
export const getNextTriggerTime = params => {
    return get({
        url: '/tool/xxljob/jobinfo/nextTriggerTime',
        params
    })
}
